<link rel="stylesheet" href="__STATIC__/module/common/layui/css/layui.css">

<style>
    .new-form-control{
        margin-left: 10px;
        width: 200px;
        padding: 5px 10px;
        height: 30px;
        font-size: 12px;
        line-height: 1.5;
        border-radius: 3px;
        box-shadow: none;
        color: #555;
        background-color: #fff;
        background-image: none;
        border: 1px solid #ccc;
    }
</style>

<div class="box">
  <div class="box-header">
      
    <div class="row">
        <!--<div class="col-sm-4">-->
            <!--<ob_link><a class="btn" href="{:url('walletAdd')}"><i class="fa fa-plus"></i> 新 增</a></ob_link>-->
        <!--</div>-->

        <div class="box-tools search-form">
            <div class="input-group input-group-sm">
                <input type="date" style="margin-left: 15px;width: 200px;"  class="form-control" id="date" name="date" placeholder="日期"   value="{:input('date')}"/>
                <input type="text" style="margin-left: 10px;width: 200px;"  class="form-control" name="search_data" placeholder="用户名|UID"  value="{:input('search_data')}"/>

                <select name="wallet_id" class="new-form-control">
                    <option value="" >全部币种</option>
                    {volist name='wallet' id='vo'}
                    <option value="{$vo['id']}" {notempty name="param['wallet_id']"}{if condition="$param['wallet_id'] eq $vo['id']"} selected="selected" {/if}{/notempty} >{$vo['name']}</option>
                    {/volist}
                </select>
                <select name="state" class="new-form-control">
                    <option value="" >全部状态</option>
                    <option value="0" {if condition="isset($param['state']) && $param['state'] eq 0"} selected="selected" {/if}{/notempty} >待审核</option>
                    <option value="1" {notempty name="param['state']"}{if condition="$param['state'] eq 1"} selected="selected" {/if}{/notempty} >成功</option>
                    <option value="2" {notempty name="param['state']"}{if condition="$param['state'] eq 2"} selected="selected" {/if}{/notempty} >失败</option>

                </select>
                <div class="input-group-btn" style="display:inline-block">
                    <button type="button" id="search"  url="{:url('trade_log')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>

                </div>
            </div>
        </div>
    </div>

  </div>
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th class="checkbox-select-all">
              <label>
                <input class="flat-grey js-checkbox-all" type="checkbox">
              </label>
          </th>
          <th>用户名</th>
          <th>UID</th>
          <th>闪兑钱包</th>
          <th>交易币种</th>
          <th>交易数额</th>
          <th>手续费数额</th>
          <th>到账数额</th>
          <th>闪兑钱包余额</th>
          <th>交易时间</th>
          <th>状态</th>
          <th>审核时间</th>
          <th>操作</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>
                    <label>
                        <input class="flat-grey" type="checkbox" name="ids" value="{$vo.id}">
                    </label>
                  </td>
                  <td>{$vo.username}</td>
                  <td>{$vo.user_id}</td>
                <td>{if condition="$vo['state'] eq 1"}{$vo['before_against_balance']}{else/}------{/if}</td>
                <td>{$vo->to_name}</td>
                <td>{$vo.number}</td>
                <td>{$vo.poundage_number}</td>
                <td>{$vo.account_balance}</td>
                <td>{if condition="$vo['state'] eq 1"}{$vo['after_against_balance']}{else/}------{/if}</td>
                <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                <td>{$vo.state_text}</td>
                <td>{if condition="$vo['update_time'] eq true"} {$vo.update_time|date='Y-m-d H:i:s',###}{else/}------{/if}</td>

                  <td class="col-md-2 text-center">
                      {if condition="$vo['state'] eq 1 || $vo['state'] eq 2 "}
                           ------
                      {else/}
                          <ob_link><a class="btn confirm ajax-get" href="{:url('trade_check', array('id' => $vo['id'], 'state' => 1))}"><i class="fa"></i> 批准</a></ob_link>
                          <ob_link><a class="btn confirm ajax-get" href="{:url('trade_check', array('id' => $vo['id'], 'state' => 2))}"><i class="fa"></i> 拒绝</a></ob_link>
                      {/if}

                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
      <input type="hidden"  id="layui"  value=""/>

  </div>
  <div class="box-footer clearfix text-center">
      {$list->render()}
  </div>
</div>
